﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityFrameworkDemo
{
    public class GenericsMethod
    {
        public static void ShowModel<T, A>(T model1, A model2)
             where T : ModelFather
             where A : model3
        {
            Console.WriteLine("id值为：" + model1.id + "  name值为:" + model1.name);
            Console.WriteLine("id值为：" + model2.id + "  name值为:" + model2.name);
        }
    }

    public class ModelFather
    {
        public int id { get; set; }
        public int name { get; set; }
    }

    public class model3
    {
        public int id { get; set; }
        public int name { get; set; }
    }
}
